<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>21-Vue事件修饰符</title>
    <!--①阻止事件冒泡-->
</head>
<body>
<div id="app">

    <div @click="fn1()">

        <button @click.stop="fn2()">按钮</button>

    </div>

</div>

</body>
<script src="js/vue.js"></script>
<script>

    var vue = new Vue({
        el: "#app",
        data: {},
        methods: {

            fn1(){
                console.log("div被点了~~~");
            },

            fn2(){
                console.log("button被点了~~~");
            }

        }
    })

</script>
</html>